package site;


import java.io.IOException;
import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * Servlet implementation class ListeReunionServlet
 */
public class ListeReunionServlet extends HttpServlet {
	
	public static int i = 0;

	private static final long serialVersionUID = 1L;
	@EJB
	ReunionManager rm ;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public ListeReunionServlet() {
        super();
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		    request.setAttribute("ident", rm.listeIdentReunion());
	    	request.setAttribute("Objet", rm.listeObjet());
	    	request.setAttribute("Date", rm.listeDate());
	    	request.setAttribute("Commentaire", rm.listeCommentaire());
	    	request.setAttribute("Lieu", rm.listeLieu());	    	
	    	request.setAttribute("compteRendu", rm.listeCompteRendu());
		request.getRequestDispatcher("listReunions.jsp").forward(request, response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request,response);
	}
}